package de.mmis.core.publishsubscribe.filter;

import de.mmis.core.base.abstracttree.Tree;

/**
 * Operators two compare {@link FilterValue}s.
 * 
 * @author Martin Nyolt
 * 
 */
public enum FilterOperator {
	/** tests if two values are the same: 5 EQUAL 5.0 = true */
	EQUAL,

	/** @see FilterOperator#EQUAL */
	NOT_EQUAL,

	/** tests if two {@link Tree}s are the same: 5 SAME 5.0 = false */
	IDENTICAL,

	/** @see FilterOperator#IDENTICAL */
	NOT_IDENTICAL,

	/**
	 * tests if the first {@link Tree} matches the second, according to
	 * {@link Tree#matchPattern(Tree) SExpression.matchPattern}: (a b c) MATCH
	 * (a ? c) = true
	 */
	MATCH,

	/** @see FilterOperator#MATCH */
	NOT_MATCH,

	/** tests if the first value is less than the second */
	LESS,

	/**
	 * tests if the first value is less than or equal the second
	 */
	LESS_EQUAL,

	/** tests if the first value is greater than the second */
	GREATER,

	/** tests if the first value is greater than or equal the second */
	GREATER_EQUAL,
}
